#include<bits/stdc++.h>
using namespace std;
const int N1 = 5,LMT = 1e9+10;
int xlst[N1],ylst[N1];
unordered_set<int> mark;
random_device seed;
mt19937 mt(seed());
int main(){
    int n = 20,p = 2;
    for(int i = 0;i < N1;i++){
        xlst[i] = mt()%LMT + 1;
        ylst[i] = mt()%LMT + 1;
    }
    cout<<n<<' '<<p<<'\n';
    for(int i = 1;i<=n;i++)
    {    
        int x = mt()%N1,y = mt()%N1;
        while(mark.find(x*N1 + y) != mark.end()){
            x = mt()%N1,y = mt()%N1;
        }
        mark.insert(x*N1 + y);
        cout<<x<<' '<<y<<'\n';
    }
}